import java.util.Scanner;

/**
 * Created by dllo on 3/29/18.
 */
public class Question02 {

    // 这一年的第几天
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入年");
        int year = scanner.nextInt();

        System.out.println("请输入月");
        int month = scanner.nextInt();

        System.out.println("请输入日");
        int day = scanner.nextInt();

        int num = 1;

        switch (month) {
            case 1:
                num = 0;
                break;
            case 2:
                num = 31;
                break;
            case 3:
                num = 59;
                break;
            case 4:
                num = 90;
                break;
            case 5:
                num = 120;
                break;
            case 6:
                num = 151;
                break;
            case 7:
                num = 181;
                break;
            case 8:
                num = 212;
                break;
            case 9:
                num = 243;
                break;
            case 10:
                num = 273;
                break;
            case 11:
                num = 304;
                break;
            case 12:
                num = 334;
                break;
        }

        int num2 = num + day;

        int num3 = 1;

        if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0 && month >= 2) {
            num3 = num2 + 1;
        } else {
            num3 = num2;
        }
        System.out.println("今天是今年的第" + num3 + "天");
    }
}
